<!--
 * @Author: 周洋 1430536748@qq.com
 * @Date: 2024-08-10 21:41:31
 * @LastEditors: 周洋 1430536748@qq.com
 * @LastEditTime: 2024-08-22 15:42:16
 * @version: 1.2.5
 * @Description: 
-->
<script setup lang="ts">
import { props } from '../props';
import { ModeEnum } from '@/enum/index';
const { tableColumns, align } = defineProps(props);
</script>
<template>
    <template v-for="item in tableColumns">
        <el-table-column v-if="item.mode === ModeEnum.SELECTION" type="selection" :width="item.width" :align="align" />
        <el-table-column v-if="item.mode === ModeEnum.INPUT" show-overflow-tooltip :prop="item.prop" :label="item.label" :width="item.width" :align="align" />

        
        <!-- 按钮 -->
        <el-table-column v-if="item.mode === ModeEnum.OPERATOR"  :align="align" :label="item.label">
            <template #default="{row}">
                <component v-for="b in item.operator" :is="b.render" :rows="row" />
            </template>
        </el-table-column>
    </template>
</template>